import request from '@/utils/request'

// 获取员工列表
export function getEmployees(data) {
  return request({
    url: '/users',
    params: data
  })
}

// 新增员工
export function addEmployees(data) {
  return request({
    url: '/auth/local/register',
    method: 'post',
    data
  })
}

// 删除员工
export function delEmployees(id) {
  return request({
    url: '/users/' + id,
    method: 'delete'
  })
}

// 编辑员工
export function editEmployees(data) {
  return request({
    url: '/users/' + data.id,
    method: 'put',
    data
  })
}

// 获取制定接口
export function getEmployeess(id) {
  return request({
    url: '/users/' + id
  })
}

// 获取员工数量
export function getEmployeesList() {
  return request({
    url: '/users/count'
  })
}
